<div ng-controller="promotionPosterCtrl">
    <div class="bg-light lter b-b wrapper-md">
        <h4 class="m-n font-thin">推广海报</h4>
    </div>
    <div class="wrapper-md">
        <div class="panel-body bg-white">
            <div class="row b-b panel-body">
                <div class="col-md-9">
                    <form class="form-inline">
                        <div class="form-group block m-t-sm">
                            <div class="form-group">
                                <label class="control-label">海报名称</label>
                                <input type="text" ng-model="promotionPosterListVO.fileName" class="input-sm form-control">
                            </div>
                            <label class="control-label">海报类型</label>
                            <select class="input-sm form-control" ng-model="promotionPosterListVO.type"
                                    ng-options="item.value as item.name for item in typeObject">
                                <option value="">－－请选择－－</option>
                            </select>
                        </div>
                        <button class="btn btn-sm btn-info" ng-click="query()">查询</button>
                    </form>
                </div>
                <div class="pull-right">
                    <button class="btn btn-success m-n" ui-sref="app.promotionPosterAdd">新增海报设置</button>
                </div>
            </div>
            <div class="panel-body wrapper">
                <ul class="list-unstyled">
                    <li class="col-md-5ths" ng-repeat="item in list">
                        <div class="thumbnail wrapper-md" style="height: 505px">
                            <div class="text-center" style="height: 365px">
                                <img ng-src="{{app.image.promotionPoster}}{{item.fileName}}" class="w-full">
                            </div>
                            <div class="caption b-t m-t">
                                <h4 class="text-ellipsis">{{item.fileName}}</h4>
                                <p>
                                    <a class="btn btn-primary" ui-sref="app.promotionPosterAdd({id:item.id})">编辑</a>
                                    <a class="btn btn-default" ng-click="download(item)">下载</a>
                                </p>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
            <div ng-if="list.length<=0 && !app.loading" class="padder-v text-center">
                <span class="h6">~未搜索到任何数据~</span>
            </div>
            <div>
                <circle-loading ng-if="app.loading"></circle-loading>
            </div>
        </div>
        <footer class="panel-footer">
            <div class="row">
                <div class="col-sm-4 hidden-xs">
                </div>
                <div class="col-sm-4 text-center">
                    <small class="text-muted inline m-t-sm m-b-sm">显示第 {{startRow}} 至 {{endRow}} 项结果，共
                        {{totalItems}} 项
                    </small>
                </div>
                <div class="col-sm-4 text-right text-center-xs">
                    <pagination boundary-links="true" total-items="totalItems" ng-model="page.currentPage"
                                ng-change="replacePage()" max-size="{{maxPageRow}}"
                                class="pagination-sm m-t-none m-b"
                                previous-text="上一页" next-text="下一页"
                                first-text="首页" last-text="尾页"></pagination>
                </div>
            </div>
        </footer>
    </div>
</div>

